package com.itheima.TCP.TCP发送协议;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDemo5 {
    public static void main(String[] args) throws IOException {
        //创建socket对象
        Socket socket = new Socket("127.0.0.2", 2);
        //向服务器写数据
        OutputStream os = socket.getOutputStream();
        os.write("写个正确的IP：127.0.0.1".getBytes());
        //关流
            socket.close();

    }
}
